<template>
  <!-- 顶部组件 -->
  <nav-bar />
  <!-- 头部组件 -->
  <Header />
  <div class="main">
    <!-- 二级路由 -->
    <RouterView />
  </div>
  <!-- 尾部组件 -->
  <Footer />
</template>
<script>
import NavBar from "@/components/NavBar.vue";
import Header from "@/components/Header.vue";
import Footer from "@/components/Footer.vue";
import { useStore } from "vuex";
export default {
  name: "App",
  components: {
    NavBar,
    Header,
    Footer,
  },
  setup() {
    const store = useStore();
    store.dispatch("category/getCategoryList");
  },
};
</script>

<style lang="less" scoped>
.main {
  min-height: 600px;
}
</style>